/*
 * @Author: Setsuna
 * @Email: setsuna.xyz@qq.com
 * @FilePath: \src\pages\SystemSettings\StatementOfAccountConfig\index.tsx
 * @Date: 2022-03-16 16:37:16
 * @LastEditTime: 2022-03-17 12:10:40
 */


import { UdPage, UdPageHeader } from '@/lib'
import { Tabs } from 'antd'
import * as React from 'react'
import EconomicBusinessConfig from './EconomicBusinessConfig'
import ReconciliationLetterTemplate from './ReconciliationLetterTemplate'
import udMainStore from '@/store/UdMain'
const { TabPane } = Tabs
export default class StatementOfAccountRecord extends React.PureComponent<any> {
  private brandList = udMainStore.brandList
  state = {
    activekey: '0',
  }

  private callback = activekey => {
    this.setState({ activekey })
  }
  render() {
    let { activekey } = this.state
    return (
      <UdPage className="list-page statementOfAccountRecord">
        <UdPageHeader title="对账函配置" />
        <Tabs defaultActiveKey="0" onChange={this.callback}>
          <TabPane tab="经济业务项目配置" key="0">
            {activekey === '0' && <EconomicBusinessConfig brandList={this.brandList} />}
          </TabPane>
          <TabPane tab="对账函模板配置" key="1">
            {activekey === '1' && <ReconciliationLetterTemplate brandList={this.brandList} />}
          </TabPane>
        </Tabs>
      </UdPage>
    )
  }
}
